<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wwwApp: DB_PostgreSQL Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wwwApp
   </div>
   <div id="projectbrief">A web app for workshop organizing, recruitment and qualification</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">DB_PostgreSQL Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for DB_PostgreSQL:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classDB__PostgreSQL.png" usemap="#DB_PostgreSQL_map" alt=""/>
  <map id="DB_PostgreSQL_map" name="DB_PostgreSQL_map">
<area href="classDB__SQL.html" alt="DB_SQL" shape="rect" coords="0,56,104,80"/>
<area href="classDB.html" alt="DB" shape="rect" coords="0,0,104,24"/>
</map>
 </div></div>

<p><a href="classDB__PostgreSQL-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a35c72d161281997ab74e7d2db24e3b4e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__PostgreSQL.html#a35c72d161281997ab74e7d2db24e3b4e">connect</a> ($connectionString)</td></tr>
<tr class="memitem:aca232dd63294f547b04b1da589c065ae"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__PostgreSQL.html#aca232dd63294f547b04b1da589c065ae">last_error</a> ()</td></tr>
<tr class="inherit_header pub_methods_classDB__SQL"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classDB__SQL')"><img src="closed.png" alt="-"/>&nbsp;Public Member Functions inherited from <a class="el" href="classDB__SQL.html">DB_SQL</a></td></tr>
<tr class="memitem:a1a580ec0eb6ad87c9993562531265314 inherit pub_methods_classDB__SQL"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__SQL.html#a1a580ec0eb6ad87c9993562531265314">query</a> ($query, $params=null)</td></tr>
<tr class="inherit_header pub_methods_classDB"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classDB')"><img src="closed.png" alt="-"/>&nbsp;Public Member Functions inherited from <a class="el" href="classDB.html">DB</a></td></tr>
<tr class="memitem:af448d1613ece8e2da7aec313e034dda6 inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#af448d1613ece8e2da7aec313e034dda6">__get</a> ($name)</td></tr>
<tr class="memitem:abd238125cc5e22cc83461af76e535db5 inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#abd238125cc5e22cc83461af76e535db5">__call</a> ($name, $args)</td></tr>
<tr class="memitem:a27e743626280f0e9cba228a8d9343d3d inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a27e743626280f0e9cba228a8d9343d3d">num_rows</a> ()</td></tr>
<tr class="memitem:a946b17452055bacf43cae40100565566 inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a946b17452055bacf43cae40100565566">affected_rows</a> ()</td></tr>
<tr class="memitem:ae314c1807aa636e83084e7f776df8ca5 inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#ae314c1807aa636e83084e7f776df8ca5">fetch</a> ()</td></tr>
<tr class="memitem:ace53342d5a272275e9a95b151511d179 inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#ace53342d5a272275e9a95b151511d179">fetch_assoc</a> ($n=null)</td></tr>
<tr class="memitem:a24e5e9e3745e28578179ab3a6169b80c inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a24e5e9e3745e28578179ab3a6169b80c">fetch_all</a> ()</td></tr>
<tr class="memitem:a2284276ef8e3be156cd57d6be193ff4c inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a2284276ef8e3be156cd57d6be193ff4c">fetch_column</a> ($c=null)</td></tr>
<tr class="memitem:a0ea6b9f5f21f19ae1e6f334b86c37e67 inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a0ea6b9f5f21f19ae1e6f334b86c37e67">fetch_int</a> ()</td></tr>
<tr class="memitem:a8e61ac6b0aceea9beed7e06b867fbf6d inherit pub_methods_classDB"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a8e61ac6b0aceea9beed7e06b867fbf6d">fetch_vector</a> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a9c143e75ac1ba2332e3c36f5eff134ee"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__PostgreSQL.html#a9c143e75ac1ba2332e3c36f5eff134ee">__construct</a> ($connectionString)</td></tr>
<tr class="memitem:a7dc613873fda5de64d0d1ec4e44bc6c8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__PostgreSQL.html#a7dc613873fda5de64d0d1ec4e44bc6c8">query_params</a> ($<a class="el" href="classDB__SQL.html#a1a580ec0eb6ad87c9993562531265314">query</a>, $params)</td></tr>
<tr class="memitem:a1381da42a9857f8a06b9c4b602b726f2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__PostgreSQL.html#a1381da42a9857f8a06b9c4b602b726f2">query_noparams</a> ($<a class="el" href="classDB__SQL.html#a1a580ec0eb6ad87c9993562531265314">query</a>)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="postgresql_8php_source.html#l00008">8</a> of file <a class="el" href="postgresql_8php_source.html">postgresql.php</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9c143e75ac1ba2332e3c36f5eff134ee"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB_PostgreSQL::__construct </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$connectionString</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classDB.html#aaf7049cc36effb73ddfbc2636667d02c">DB</a>.</p>

<p>Definition at line <a class="el" href="postgresql_8php_source.html#l00010">10</a> of file <a class="el" href="postgresql_8php_source.html">postgresql.php</a>.</p>
<div class="fragment"><div class="line">        {</div>
<div class="line">                <a class="code" href="classDB__PostgreSQL.html#a9c143e75ac1ba2332e3c36f5eff134ee">parent::__construct</a>($connectionString);</div>
<div class="line">                $this-&gt;driver = <span class="stringliteral">&#39;PostgreSQL&#39;</span>;</div>
<div class="line">                <a class="code" href="classDB.html#a75d8342d237a97b7822d691aa5a2546c">$tables</a> = $this-&gt;<a class="code" href="classDB__SQL.html#a1a580ec0eb6ad87c9993562531265314">query</a>(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                        SELECT relname</span></div>
<div class="line"><span class="stringliteral">                        FROM pg_class</span></div>
<div class="line"><span class="stringliteral">                        WHERE</span></div>
<div class="line"><span class="stringliteral">                                relname LIKE $1 AND</span></div>
<div class="line"><span class="stringliteral">                                relowner NOT IN (SELECT usesysid FROM pg_user WHERE usename=\&#39;postgres\&#39;) AND</span></div>
<div class="line"><span class="stringliteral">                                relkind = \&#39;r\&#39;</span></div>
<div class="line"><span class="stringliteral">                        &#39;</span>,</div>
<div class="line">                        <a class="code" href="config_8php_8template.html#a5f2257735345fb41d6dbb3f7a9036a4b">TABLE_PREFIX</a>.<span class="charliteral">&#39;%&#39;</span></div>
<div class="line">                );</div>
<div class="line">                <span class="comment">//$this-&gt;tables[&#39;pg_class&#39;] = new DBTable_Postgresql($this, &#39;pg_class&#39;, array(array(&#39;name&#39;=&gt;&#39;relname&#39;,)));</span></div>
<div class="line">                <span class="keywordflow">foreach</span> (<a class="code" href="classDB.html#a75d8342d237a97b7822d691aa5a2546c">$tables</a> as $table)</div>
<div class="line">                {</div>
<div class="line">                        $result = $this-&gt;<a class="code" href="classDB__SQL.html#a1a580ec0eb6ad87c9993562531265314">query</a>(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                                SELECT</span></div>
<div class="line"><span class="stringliteral">                                        pg_attribute.attname AS name,</span></div>
<div class="line"><span class="stringliteral">                                        format_type(pg_attribute.atttypid, pg_attribute.atttypmod) AS type</span></div>
<div class="line"><span class="stringliteral">                                FROM pg_index, pg_class, pg_attribute</span></div>
<div class="line"><span class="stringliteral">                                WHERE</span></div>
<div class="line"><span class="stringliteral">                                        pg_class.oid = $1::regclass AND</span></div>
<div class="line"><span class="stringliteral">                                        indrelid = pg_class.oid AND</span></div>
<div class="line"><span class="stringliteral">                                        pg_attribute.attrelid = pg_class.oid AND</span></div>
<div class="line"><span class="stringliteral">                                        pg_attribute.attnum = any(pg_index.indkey) AND</span></div>
<div class="line"><span class="stringliteral">                                        indisprimary</span></div>
<div class="line"><span class="stringliteral">                                ORDER BY pg_attribute.attnum</span></div>
<div class="line"><span class="stringliteral">                                &#39;</span>, $table[<span class="stringliteral">&#39;relname&#39;</span>]</div>
<div class="line">                        );</div>
<div class="line">                        $this-&gt;tables[$table[<span class="stringliteral">&#39;relname&#39;</span>]] =</div>
<div class="line">                                <span class="keyword">new</span> DBTable_Postgresql($this, $table[<span class="stringliteral">&#39;relname&#39;</span>], $this-&gt;<a class="code" href="classDB.html#a24e5e9e3745e28578179ab3a6169b80c">fetch_all</a>());</div>
<div class="line">                }</div>
<div class="line">        }</div>
</div><!-- fragment -->
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a35c72d161281997ab74e7d2db24e3b4e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DB_PostgreSQL::connect </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$connectionString</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classDB.html#a031c0b13b6803f486c377a4c98774f4d">DB</a>.</p>

<p>Definition at line <a class="el" href="postgresql_8php_source.html#l00045">45</a> of file <a class="el" href="postgresql_8php_source.html">postgresql.php</a>.</p>
<div class="fragment"><div class="line">{ <span class="keywordflow">return</span> pg_connect($connectionString); }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aca232dd63294f547b04b1da589c065ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DB_PostgreSQL::last_error </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classDB.html#a73cdc78a3b878af16d7163bfb01f4d2c">DB</a>.</p>

<p>Definition at line <a class="el" href="postgresql_8php_source.html#l00047">47</a> of file <a class="el" href="postgresql_8php_source.html">postgresql.php</a>.</p>
<div class="fragment"><div class="line">{ <span class="keywordflow">return</span> pg_last_error(); }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1381da42a9857f8a06b9c4b602b726f2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB_PostgreSQL::query_noparams </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$query</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classDB__SQL.html#a8c58cadec5d7776ade2f6a3d71b1554a">DB_SQL</a>.</p>

<p>Definition at line <a class="el" href="postgresql_8php_source.html#l00050">50</a> of file <a class="el" href="postgresql_8php_source.html">postgresql.php</a>.</p>
<div class="fragment"><div class="line">{ <span class="keywordflow">return</span> pg_query($query); }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7dc613873fda5de64d0d1ec4e44bc6c8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB_PostgreSQL::query_params </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classDB__SQL.html#a2b01f1bee3e2b4ee87e593251ad1e0db">DB_SQL</a>.</p>

<p>Definition at line <a class="el" href="postgresql_8php_source.html#l00049">49</a> of file <a class="el" href="postgresql_8php_source.html">postgresql.php</a>.</p>
<div class="fragment"><div class="line">{ <span class="keywordflow">return</span> pg_query_params($query, $params); }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>database/<a class="el" href="postgresql_8php_source.html">postgresql.php</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 8 2013 17:44:57 for wwwApp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
